import axios from 'axios'

export const baseURL = 'http://localhost:1337'


// 配置基地址
const request = axios.create({
  baseURL,
  timeout: 5000
})

request.interceptors.response.use(response => {
  // 数据剥离
  return response.data
}, error => {
  return Promise.reject(error)
});

export default request